com.justhis.jibx
Class JibxUtil

java.lang.Object
  extended bycom.justhis.jibx.JibxUtil

public class JibxUtil
extends java.lang.Object

TODO

Version:
$Revision: 1.1 $
Author:
acai

Constructor Summary
JibxUtil()
          Creates a new JibxUtil object.
 
Method Summary
static void marshallDocument(java.lang.Object obj, java.lang.String xslt, int indent, java.lang.String encoding, java.io.OutputStream out)
          marshall document by a jibx object enhanced.
static void marshallDocument(java.lang.Object obj, java.lang.String xslt, java.io.OutputStream out)
          marshall jibx object to print xml document.
static void marshallDocument(java.lang.Object obj, java.lang.String xslt, java.lang.String fileName)
          marshall jibx object to print xml document file.
static java.lang.Object unmarshallDocument(java.lang.Class cs, java.io.InputStream ins)
          get jibx object from inputstream
static java.lang.Object unmarshallDocument(java.lang.Class cs, java.lang.String fileName)
          get object from xml file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JibxUtil

public JibxUtil()
Creates a new JibxUtil object.

Method Detail

marshallDocument

public static void marshallDocument(java.lang.Object obj,
                                    java.lang.String xslt,
                                    int indent,
                                    java.lang.String encoding,
                                    java.io.OutputStream out)
                             throws java.io.FileNotFoundException,
                                    org.jibx.runtime.JiBXException
marshall document by a jibx object enhanced.

Parameters:
obj - a jibx object
xslt - xslt file name
indent - tidy document indent
encoding - document's encoding
out - stream of print document
Throws:
java.io.FileNotFoundException - if file not found.
org.jibx.runtime.JiBXException - if use jibx to mashall document.

marshallDocument

public static void marshallDocument(java.lang.Object obj,
                                    java.lang.String xslt,
                                    java.io.OutputStream out)
                             throws java.io.FileNotFoundException,
                                    org.jibx.runtime.JiBXException
marshall jibx object to print xml document.

Parameters:
obj - marshalled object
xslt - xslt file name
out - a stream of print xml doucment.
Throws:
java.io.FileNotFoundException - if file not found
org.jibx.runtime.JiBXException - if deal with jibx object ocurr any error.

marshallDocument

public static void marshallDocument(java.lang.Object obj,
                                    java.lang.String xslt,
                                    java.lang.String fileName)
                             throws java.io.FileNotFoundException,
                                    org.jibx.runtime.JiBXException
marshall jibx object to print xml document file.

Parameters:
obj - jibx object
xslt - xslt file name or path
fileName - a file printed xml document
Throws:
java.io.FileNotFoundException - if can't find any file
org.jibx.runtime.JiBXException - if any jibx error occurs

unmarshallDocument

public static java.lang.Object unmarshallDocument(java.lang.Class cs,
                                                  java.io.InputStream ins)
                                           throws org.jibx.runtime.JiBXException
get jibx object from inputstream

Parameters:
cs - class name
ins - input stream
Returns:
a jibx object
Throws:
org.jibx.runtime.JiBXException - if any jibx error occurs

unmarshallDocument

public static java.lang.Object unmarshallDocument(java.lang.Class cs,
                                                  java.lang.String fileName)
                                           throws org.jibx.runtime.JiBXException
get object from xml file

Parameters:
cs - class name
fileName - xml file name
Returns:
jibx object
Throws:
org.jibx.runtime.JiBXException - if any jibx exception occurs


Copyright © 2003 EastNetworks.Net(China)Co.,Ltd.. All Rights Reserved.